package com.wikidot.designpatterns.composite.alternative2;

public class Composite extends Component {

	public Composite(String name) {
		super(name);
	}

	@Override
	public void businessOperation() {
		System.out.println(this.name
				+ " performing business operation for composite node.");
		// Call business method for all descendants
		for (Component descendant : this.composite) {
			descendant.businessOperation();
		}
	}
}
